import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Menu item for the main screen
 * 
 * @author Jasper Jans
 * 
 */
public class TitleScreenItem extends Actor
{
    
    private boolean isSelected;
    private String name;
    
    public TitleScreenItem(String name, boolean isSelected)
    {
        this.name = name;
        
        setIsSelected(isSelected);
        
    }
    
    
   
    public void act() 
    {
        // Add your action code here.
    }
    
    public void setIsSelected(boolean isSelected)
    {
        
        GreenfootImage img = new GreenfootImage("menu/" + name + ( isSelected ? "-selected" : "" ) + ".png");
        setImage(img);
        this.isSelected = isSelected;
          
    }
}
